home *** CD-ROM | disk | FTP | other *** search
- Subject: Creating part
- Sent: 6/19/96 11:33 PM
- Received: 6/24/96 8:25 AM
- From: Steinar.Tyvand@si.sintef.no
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- I mailed this in some days ago, but try again:
-
- -Damon, Quality ODF Guy, wrote:
-
- >Second, you need to obtain a reference to your document's draft and ask the
- >draft to create a new ODPart. Given an FW_CPart, the following code will
- >work:
- >
- > ODStorageUnit* su = myPart -> GetStorageUnit (ev);
- > ODDraft* draft = su -> GetDraft (ev);
- > FW_CAcquiredODPart newPart = draft ->
- > CreatePart (ev, kTextKind,
- kODNoEditor);
- >
- >Note that in the above code, kTextKind would be the full ISO string
- >describing the kind of data to be embedded. kODNoEditor signifies that
- >OpenDoc should feel free to choose which editor to use for the embedded
- >data. Instead, this parameter could be an ISO string for a particular
- >editor.
- >
-
- My question is then:
- Can I pass "kMyEmbeddedKind" and "kMyEmbeddedEditor" in the
- draft->CreatePart function to create a part of my (embedded) kind?
-
- Should I include the defines for embedded kind and editor in Binding.k for
- the EMBEDDING part? Is that enough to have CreatePart do the right things?
-
- Steinar
- --------------------------------------------------------------
- Steinar Tyvand e-mail: Steinar.Tyvand@unimed.sintef.no
- SINTEF Unimed Rehab Phone: +47 22 06 78 29 (work)
- Box 124 Blindern Fax: +47 22 06 79 09 (work)
- N-0314 Oslo Phone: +47 67 56 17 79 (home)
- Norway Fax: +47 67 56 05 36 (home)
- --------------------------------------------------------------
-